package com.jason.learn.springcloud.searchservice.enty;

import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Document(indexName = "sc_order",shards = 1,replicas = 0)
public class BuyOrder implements Serializable{
    @Id
    private Long orderId;
    //@Field(name="create_time",type = FieldType.Date, format= DateFormat.custom,pattern ="yyyy-MM-dd'T'HH:mm:sszzz")
    @Field(name="create_time")
    private String createTime;
    @Field(name="mer_no")
    private Long merNo;
    @Field(name="status")
    private int status;
    @Field(name="amount")
    private BigDecimal amount;
    @Field(name="buyer_card")
    private String buyerCard;

    public String getBuyerCard() {
        return buyerCard;
    }

    public void setBuyerCard(String buyerCard) {
        this.buyerCard = buyerCard;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Long getMerNo() {
        return merNo;
    }

    public void setMerNo(Long merNo) {
        this.merNo = merNo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

}
